Project 3: Photometric Stereo

Tuo Wang

1.       Goal:

Implement a system to construct a height field from a series of images of a diffuse object under different point light sources.

2.       Methodology

a)       Camera calibration

b)       Solving for normals and albedo

c)       Least square surface fitting

3.       How to Run

Run the ¡°Main_PhotometricStereo.m¡± file to get the result. Using the command ¡®dataname= sprint('psmImages/owl/owl.%d.ppm',i)¡¯ and ¡®mask=imread('psmImages/owl/owl.mask.ppm')¡¯ to designate input images.

Function explanation:

getCenter.m: computing the center of the ball

getRadius.m: computing the radius of the ball

getDirection: computing the light direction

solveNormalandAlbedo.m: caculating the normals and albedo, and ploting the RGB-normal map and albedo map

getDepth: least square surface fitting

4.       Result

Albedo map:

albedo buddha.pngalbedo cat.pngalbedo owl.png

RGB-normal map:

normal buddha.pngnormal cat.pngnormal owl.png

Recovered surfaces in 2 views:

ReconstructedSurface buddha 1.pngReconstructedSurface cat 1.pngReconstructedSurface owl 1.pngReconstructedSurface buddha 2.pngReconstructedSurface cat 2.pngReconstructedSurface owl 2.png

5.       Favorite Result

Cat:

albedo cat.pngnormal cat.pngReconstructedSurface cat 1.pngReconstructedSurface cat 2.png